﻿namespace Zove.Runtime.Core
{
    /// <summary>
    /// Load a class from different types of sources.
    /// </summary>
    public interface IClassLoader
    {
        /// <summary>
        /// Class finder
        /// </summary>
        IClassFinder ClassFinder { get; set; }

        /// <summary>
        /// Load from source
        /// </summary>
        /// <param name="content">the source</param>
        /// <returns>the class</returns>
        ZoomClass LoadFromSource(string content);

        /// <summary>
        /// Load from the given class name
        /// </summary>
        /// <param name="className">the class name</param>
        /// <returns>the class</returns>
        ZoomClass LoadByClassName(string className);

        /// <summary>
        /// Load from a given location
        /// </summary>
        /// <param name="uri">the location</param>
        /// <returns>the class</returns>
        ZoomClass LoadFromFile(string uri);
    }
}